package com.gitee.sop.layui.adminserver.module.background.admin.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.gitee.sop.layui.adminserver.module.background.admin.entity.SysUserFunctionRoleRelation;

import java.util.List;

/**
 * com.zch.admin.base.entity.SysAdminFnroleUserRelation模型业务接口
 *
 * @author: admin
 * @date: 2019-11-28
 * @version: 1.0.0
 */
public interface SysUserFunctionRoleRelationService extends IService<SysUserFunctionRoleRelation> {

    /**
     * 设置用户功能角色
     *
     * @param userUuid     用户的uuid
     * @param fnRoleIdList 功能角色id
     */
    void setAuthority(String userUuid, List<Integer> fnRoleIdList);

    /**
     * 获取指定用户的功能角色id
     *
     * @param userUuid 用户uuid
     * @return
     */
    List<Integer> getFunctionRoleIdByUserUuid(String userUuid);

    /**
     * 获取指定功能角色的条目数
     *
     * @param functionRoleIdList 功能角色id列表
     * @return
     */
    int countInFunctionRoleIdList(List<Integer> functionRoleIdList);

    /**
     * 删除指定的用户
     *
     * @param uuid 删除用户uuid
     */
    void removeByUserUuid(String uuid);
}